<template>
  <component :is="layout">
    <router-view></router-view>
  </component>
</template>

<script setup>
import { computed } from 'vue';
import { useRoute } from 'vue-router';

// 获取当前路由
const route = useRoute();

// 根据路由的 meta.layout 动态选择布局
const layout = computed(() => {
  return route.meta.layout || 'default';  // 默认布局为 DefaultLayout
});
</script>
